<style>
    #billboy{
        font-size: 14px;
        width: 80%;
    }
    #userdetail{
        line-height: 36px;
        padding-left: 20px;
        padding-bottom: 10px;
        font-size: 16px;
    }
    #userdetail input{
        width: 80%;
        height: 20px;
        font-size: 16px;
        padding: 2px;
    }
    #userdetail select{
        width: 50%;
        font-size: 16px;
        padding: 2px;
    }
    #bf{
        background-color: #eee;
        text-align: right;
        width: 15%;
        height: 50px;
    }
    #cf{
        width: 35%;
    }
</style>
<?php
if($this->ma == 1){
    echo '<script language="javascript" type="text/javascript">alert("待办事务添加成功！");location.href = "/admini/manageadmin/backlog/"; </script>';
}else if($this->ma == 2){
    echo '<script language="javascript" type="text/javascript">alert("待办事务添加失败，请重新添加！");</script>';
}
?>
<div id="billboy">
    <div id='userdetail'>
        添加待办事务
        <form action="/admini/manageadmin/rebacklog/" method="post">
            <table width="100%" border="1" cellpadding="0" cellspacing="0">  
                <tr>
                  <td id='bf'>事务类型：</td>
                  <td id='cf' valign="middle" colspan="3">&nbsp;&nbsp;<select id="sourceType" name="sourceType">
                      <?php foreach ($this->sourceTypeAll as $key => $sourceVal) { ?>
                        <option value="<?php echo $key;?>"><?php echo $sourceVal;?></option>
                      <?php }?>
                    </select></td>
                </tr>
                <tr>
                  <td id='bf' style="height:250px;">内容：</td>
                  <td id='cf' colspan="3" valign="middle">&nbsp;&nbsp;<textarea name="content" id="content"  cols="99" rows="12" style="font-size:16px;resize:none;"></textarea></td>
                </tr>
                <tr>
                    <td id='bf'>处理人：</td>
                    <td id='cf' valign="middle">&nbsp;&nbsp;<select id="solveName" name="solveName" >
                        <?php foreach ($this->userAll as $userVal) { ?>
                                <option value="<?php echo $userVal->id;?>"><?php echo $userVal->nikename;?></option>
                        <?php }?></select></td>
                    <td id='bf'>预计处理时间：</td>
                    <td id='cf' valign="middle">&nbsp;&nbsp;<input type="text" name="solveDay" id="solveDay"  value=""/>天</td>
                </tr>
                <tr>
                    <td id='bf'>处理方案：</td>
                    <td id='cf' valign="middle">&nbsp;&nbsp;<textarea name="comment" id="comment"  cols="50" rows="12" style="font-size:16px;resize:none;"></textarea></td>
                    <td id='bf'>知会人：</td>
                    <td id='cf' valign="middle">&nbsp;&nbsp;<select id="knowUser" name="knowUser[]" size="12" multiple="multiple">
                        <?php foreach ($this->userAll as $userVal) { ?>
                                <option value="<?php echo $userVal->id;?>"><?php echo $userVal->nikename;?></option>
                        <?php }?></select></td>
                </tr>
                <tr>
                    <td id='cf' colspan="4" align="right"><input type="hidden" name="operate" id="operate" value="rebacklog" />
                        <input type="submit" id="submit" name="submit" value="添加记录" style="background-color: #1668A4;width: 80px;height: 36px;color: white;font-size: 16px;border-radius:8px;" />&nbsp;&nbsp;</td>
                </tr>
              </table>
          </form>
    </div>
</div>
<script type="text/javascript">
    $('#submit').click(function(){
        var content = $('#content').val();
        var solveDay = $("#solveDay").val();
        if(content == ''){
            alert("待办事务内容不能为空！");
            return false;
        }else if (solveDay == "") {
            alert("待办事务预计处理时间能为空！");
            return false;
        }else{
            return true;
        }
    });
</script>